home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 2000 April: Mac OS SDK / Dev.CD Apr 00 SDK1.toast / Development Kits / Mac OS / UPDATE- Int&Libs 3.2 / AIncludes / UnicodeUtilities.a < prev    next >
Encoding:
Text File  |  1999-05-25  |  20.4 KB  |  468 lines  |  [TEXT/MPS ]

  1. ;
  2. ;    File:        UnicodeUtilities.a
  3. ;
  4. ;    Contains:    Types, constants, prototypes for Unicode Utilities (Unicode input and text utils)
  5. ;
  6. ;    Version:    Technology:    Allegro
  7. ;                Release:    Veronica Seed, Use with 3.2 Universal Interfaces
  8. ;
  9. ;    Copyright:    © 1997-1999 by Apple Computer, Inc., all rights reserved.
  10. ;
  11. ;    Bugs?:        For bug reports, consult the following page on
  12. ;                the World Wide Web:
  13. ;
  14. ;                    http://developer.apple.com/bugreporter/
  15. ;
  16. ;
  17.     IF &TYPE('__UNICODEUTILITIES__') = 'UNDEFINED' THEN
  18. __UNICODEUTILITIES__ SET 1
  19.  
  20.     IF &TYPE('__MACTYPES__') = 'UNDEFINED' THEN
  21.     include 'MacTypes.a'
  22.     ENDIF
  23.     IF &TYPE('__MACLOCALES__') = 'UNDEFINED' THEN
  24.     include 'MacLocales.a'
  25.     ENDIF
  26.  
  27. ;   -------------------------------------------------------------------------------------------------
  28. ;   CONSTANTS & DATA STRUCTURES for UCKeyTranslate & UCKeyboardLayout ('uchr' resource)
  29. ;   -------------------------------------------------------------------------------------------------
  30.  
  31.  
  32.  
  33.  
  34. ;   -------------------------------------------------------------------------------------------------
  35. ;   UCKeyOutput & related stuff
  36. ;   The interpretation of UCKeyOutput depends on bits 15-14.
  37. ;   If they are 01, then bits 0-13 are an index in UCKeyStateRecordsIndex (resource-wide list).
  38. ;   If they are 10, then bits 0-13 are an index in UCKeySequenceDataIndex (resource-wide list),
  39. ;     or if UCKeySequenceDataIndex is not present or the index is beyond the end of the list,
  40. ;     then bits 0-15 are a single Unicode character.
  41. ;   Otherwise, bits 0-15 are a single Unicode character; a value of 0xFFFE-0xFFFF means no character
  42. ;     output.
  43. ;   UCKeyCharSeq is similar, but does not support indices in UCKeyStateRecordsIndex. For bits 15-14:
  44. ;   If they are 10, then bits 0-13 are an index in UCKeySequenceDataIndex (resource-wide list),
  45. ;     or if UCKeySequenceDataIndex is not present or the index is beyond the end of the list,
  46. ;     then bits 0-15 are a single Unicode character.
  47. ;   Otherwise, bits 0-15 are a single Unicode character; a value of 0xFFFE-0xFFFF means no character
  48. ;     output.
  49. ;   -------------------------------------------------------------------------------------------------
  50.  
  51.  
  52.  
  53. ; typedef UInt16                         UCKeyOutput
  54.  
  55. ; typedef UInt16                         UCKeyCharSeq
  56.  
  57.  
  58. kUCKeyOutputStateIndexMask        EQU        $4000
  59. kUCKeyOutputSequenceIndexMask    EQU        $8000
  60. kUCKeyOutputTestForIndexMask    EQU        $C000                ; test bits 14-15
  61. kUCKeyOutputGetIndexMask        EQU        $3FFF                ; get bits 0-13
  62.  
  63. ;   -------------------------------------------------------------------------------------------------
  64. ;   UCKeyStateRecord & related stuff
  65. ;   The UCKeyStateRecord information is used as follows. If the current state is zero,
  66. ;   output stateZeroCharData and set the state to stateZeroNextState. If the current state
  67. ;   is non-zero and there is an entry for it in stateEntryData, then output the corresponding
  68. ;   charData and set the state to nextState. Otherwise, output the state terminator from
  69. ;   UCKeyStateTerminators for the current state (or nothing if there is no UCKeyStateTerminators
  70. ;   table or it has no entry for the current state), then output stateZeroCharData and set the
  71. ;   state to stateZeroNextState.
  72. ;   -------------------------------------------------------------------------------------------------
  73.  
  74.  
  75.  
  76. UCKeyStateRecord        RECORD 0
  77. stateZeroCharData         ds.w    1                ; offset: $0 (0)
  78. stateZeroNextState         ds.w    1                ; offset: $2 (2)
  79. stateEntryCount             ds.w    1                ; offset: $4 (4)
  80. stateEntryFormat         ds.w    1                ; offset: $6 (6)
  81. ;  This is followed by an array of stateEntryCount elements
  82. ;  in the specified format. Here we just show a dummy array.
  83. stateEntryData             ds.l    1                ; offset: $8 (8) <-- really an array of length one
  84. sizeof                     EQU *                    ; size:   $C (12)
  85.                         ENDR
  86.  
  87. ;   Here are the codes for entry formats currently defined.
  88. ;   Each entry maps from curState to charData and nextState.
  89.  
  90.  
  91.  
  92. kUCKeyStateEntryTerminalFormat    EQU        $0001
  93. kUCKeyStateEntryRangeFormat        EQU        $0002
  94.  
  95. ;   For UCKeyStateEntryTerminal -
  96. ;   nextState is always 0, so we don't have a field for it
  97.  
  98.  
  99.  
  100. UCKeyStateEntryTerminal    RECORD 0
  101. curState                 ds.w    1                ; offset: $0 (0)
  102. charData                 ds.w    1                ; offset: $2 (2)
  103. sizeof                     EQU *                    ; size:   $4 (4)
  104.                         ENDR
  105.  
  106. ;   For UCKeyStateEntryRange -
  107. ;   If curState >= curStateStart and curState <= curStateStart+curStateRange,
  108. ;   then it matches the entry, and we transform charData and nextState as follows:
  109. ;   If charData < 0xFFFE, then charData += (curState-curStateStart)*deltaMultiplier
  110. ;   If nextState != 0, then nextState += (curState-curStateStart)*deltaMultiplier
  111.  
  112.  
  113. UCKeyStateEntryRange    RECORD 0
  114. curStateStart             ds.w    1                ; offset: $0 (0)
  115. curStateRange             ds.b    1                ; offset: $2 (2)
  116. deltaMultiplier             ds.b    1                ; offset: $3 (3)
  117. charData                 ds.w    1                ; offset: $4 (4)
  118. nextState                 ds.w    1                ; offset: $6 (6)
  119. sizeof                     EQU *                    ; size:   $8 (8)
  120.                         ENDR
  121.  
  122. ;   -------------------------------------------------------------------------------------------------
  123. ;   UCKeyboardLayout & related stuff
  124. ;   The UCKeyboardLayout struct given here is only for the resource header. It specifies
  125. ;   offsets to the various subtables which each have their own structs, given below.
  126. ;   The keyboardTypeHeadList array selects table offsets that depend on keyboardType. The
  127. ;   first entry in keyboardTypeHeadList is the default entry, which will be used if the
  128. ;   keyboardType passed to UCKeyTranslate does not match any other entry - i.e. does not fall
  129. ;   within the range keyboardTypeFirst..keyboardTypeLast for some entry. The first entry
  130. ;   should have keyboardTypeFirst = keyboardTypeLast = 0.
  131. ;   -------------------------------------------------------------------------------------------------
  132.  
  133.  
  134. UCKeyboardTypeHeader    RECORD 0
  135. keyboardTypeFirst         ds.l    1                ; offset: $0 (0)        ;  first keyboardType in this entry
  136. keyboardTypeLast         ds.l    1                ; offset: $4 (4)        ;  last keyboardType in this entry
  137. keyModifiersToTableNumOffset  ds.l 1            ; offset: $8 (8)        ;  required
  138. keyToCharTableIndexOffset  ds.l    1                ; offset: $C (12)        ;  required
  139. keyStateRecordsIndexOffset  ds.l 1                ; offset: $10 (16)        ;  0 => no table
  140. keyStateTerminatorsOffset  ds.l    1                ; offset: $14 (20)        ;  0 => no table
  141. keySequenceDataIndexOffset  ds.l 1                ; offset: $18 (24)        ;  0 => no table
  142. sizeof                     EQU *                    ; size:   $1C (28)
  143.                         ENDR
  144. UCKeyboardLayout        RECORD 0
  145. ;  header only; other tables accessed via offsets
  146. keyLayoutHeaderFormat     ds.w    1                ; offset: $0 (0)        ;  =kUCKeyLayoutHeaderFormat
  147. keyLayoutDataVersion     ds.w    1                ; offset: $2 (2)        ;  0x0100 = 1.0, 0x0110 = 1.1, etc.
  148. keyLayoutFeatureInfoOffset  ds.l 1                ; offset: $4 (4)        ;  may be 0                                    
  149. keyboardTypeCount         ds.l    1                ; offset: $8 (8)        ;  Dimension for keyboardTypeHeadList[]        
  150. keyboardTypeList         ds        UCKeyboardTypeHeader ; offset: $C (12) <-- really an array of length one
  151. sizeof                     EQU *                    ; size:   $28 (40)
  152.                         ENDR
  153. ;  -------------------------------------------------------------------------------------------------
  154. UCKeyLayoutFeatureInfo    RECORD 0
  155. keyLayoutFeatureInfoFormat  ds.w 1                ; offset: $0 (0)        ;  =kUCKeyLayoutFeatureInfoFormat
  156. reserved                 ds.w    1                ; offset: $2 (2)
  157. maxOutputStringLength     ds.l    1                ; offset: $4 (4)        ;  longest possible output string
  158. sizeof                     EQU *                    ; size:   $8 (8)
  159.                         ENDR
  160. ;  -------------------------------------------------------------------------------------------------
  161. UCKeyModifiersToTableNum RECORD 0
  162. keyModifiersToTableNumFormat  ds.w 1            ; offset: $0 (0)        ;  =kUCKeyModifiersToTableNumFormat
  163. defaultTableNum             ds.w    1                ; offset: $2 (2)        ;  For modifier combos not in tableNum[]
  164. modifiersCount             ds.l    1                ; offset: $4 (4)        ;  Dimension for tableNum[]
  165. tableNum                 ds.b    1                ; offset: $8 (8) <-- really an array of length one
  166. ;  Then there is padding to a 4-byte boundary with bytes containing 0, if necessary.
  167.                          ORG 10
  168. sizeof                     EQU *                    ; size:   $A (10)
  169.                         ENDR
  170. ;  -------------------------------------------------------------------------------------------------
  171. UCKeyToCharTableIndex    RECORD 0
  172. keyToCharTableIndexFormat  ds.w    1                ; offset: $0 (0)        ;  =kUCKeyToCharTableIndexFormat
  173. keyToCharTableSize         ds.w    1                ; offset: $2 (2)        ;  Max keyCode (128 for ADB keyboards)
  174. keyToCharTableCount         ds.l    1                ; offset: $4 (4)        ;  Dimension for keyToCharTableOffsets[] (usually 6 to 12 tables)
  175. keyToCharTableOffsets     ds.l    1                ; offset: $8 (8) <-- really an array of length one
  176. ;  Each offset in keyToCharTableOffsets is from the beginning of the resource to a
  177. ;  table as follows:
  178. ;     UCKeyOutput        keyToCharData[keyToCharTableSize];
  179. ;  These tables follow the UCKeyToCharTableIndex.
  180. ;  Then there is padding to a 4-byte boundary with bytes containing 0, if necessary.
  181. sizeof                     EQU *                    ; size:   $C (12)
  182.                         ENDR
  183. ;  -------------------------------------------------------------------------------------------------
  184. UCKeyStateRecordsIndex    RECORD 0
  185. keyStateRecordsIndexFormat  ds.w 1                ; offset: $0 (0)        ;  =kUCKeyStateRecordsIndexFormat
  186. keyStateRecordCount         ds.w    1                ; offset: $2 (2)        ;  Dimension for keyStateRecordOffsets[]
  187. keyStateRecordOffsets     ds.l    1                ; offset: $4 (4) <-- really an array of length one
  188. ;  Each offset in keyStateRecordOffsets is from the beginning of the resource to a
  189. ;  UCKeyStateRecord. These UCKeyStateRecords follow the keyStateRecordOffsets[] array.
  190. ;  Then there is padding to a 4-byte boundary with bytes containing 0, if necessary.
  191. sizeof                     EQU *                    ; size:   $8 (8)
  192.                         ENDR
  193. ;  -------------------------------------------------------------------------------------------------
  194. UCKeyStateTerminators    RECORD 0
  195. keyStateTerminatorsFormat  ds.w    1                ; offset: $0 (0)        ;  =kUCKeyStateTerminatorsFormat
  196. keyStateTerminatorCount     ds.w    1                ; offset: $2 (2)        ;  Dimension for keyStateTerminators[] (# of nonzero states)
  197. keyStateTerminators         ds.w    1                ; offset: $4 (4) <-- really an array of length one
  198. ;  Note: keyStateTerminators[0] is terminator for state 1, etc.
  199. ;  Then there is padding to a 4-byte boundary with bytes containing 0, if necessary.
  200. sizeof                     EQU *                    ; size:   $6 (6)
  201.                         ENDR
  202. ;  -------------------------------------------------------------------------------------------------
  203. UCKeySequenceDataIndex    RECORD 0
  204. keySequenceDataIndexFormat  ds.w 1                ; offset: $0 (0)        ;  =kUCKeySequenceDataIndexFormat
  205. charSequenceCount         ds.w    1                ; offset: $2 (2)        ;  Dimension of charSequenceOffsets[] is charSequenceCount+1
  206. charSequenceOffsets         ds.w    1                ; offset: $4 (4) <-- really an array of length one
  207. ;  Each offset in charSequenceOffsets is in bytes, from the beginning of
  208. ;  UCKeySequenceDataIndex to a sequence of UniChars; the next offset indicates the
  209. ;  end of the sequence. The UniChar sequences follow the UCKeySequenceDataIndex.
  210. ;  Then there is padding to a 4-byte boundary with bytes containing 0, if necessary.
  211. sizeof                     EQU *                    ; size:   $6 (6)
  212.                         ENDR
  213. ;  -------------------------------------------------------------------------------------------------
  214. ;  Current format codes for the various tables (bits 12-15 indicate which table)
  215.  
  216.  
  217. kUCKeyLayoutHeaderFormat        EQU        $1002
  218. kUCKeyLayoutFeatureInfoFormat    EQU        $2001
  219. kUCKeyModifiersToTableNumFormat    EQU        $3001
  220. kUCKeyToCharTableIndexFormat    EQU        $4001
  221. kUCKeyStateRecordsIndexFormat    EQU        $5001
  222. kUCKeyStateTerminatorsFormat    EQU        $6001
  223. kUCKeySequenceDataIndexFormat    EQU        $7001
  224.  
  225.  
  226. ;   -------------------------------------------------------------------------------------------------
  227. ;   Constants for keyAction parameter in UCKeyTranslate() 
  228. ;   -------------------------------------------------------------------------------------------------
  229.  
  230.  
  231.  
  232.  
  233. kUCKeyActionDown                EQU        0                    ; key is going down
  234. kUCKeyActionUp                    EQU        1                    ; key is going up
  235. kUCKeyActionAutoKey                EQU        2                    ; auto-key down
  236. kUCKeyActionDisplay                EQU        3                    ; get information for key display (as in Key Caps)            
  237.  
  238. ;   -------------------------------------------------------------------------------------------------
  239. ;   Bit assignments & masks for keyTranslateOptions parameter in UCKeyTranslate() 
  240. ;   -------------------------------------------------------------------------------------------------
  241.  
  242.  
  243.  
  244.  
  245. kUCKeyTranslateNoDeadKeysBit    EQU        0                    ; Prevents setting any new dead-key states
  246.  
  247. kUCKeyTranslateNoDeadKeysMask    EQU        $00000001
  248.  
  249. ;   -------------------------------------------------------------------------------------------------
  250. ;   CONSTANTS & DATA STRUCTURES for Unicode Collation
  251. ;   -------------------------------------------------------------------------------------------------
  252.  
  253.  
  254.  
  255.  
  256. ; typedef UInt32                         UCCollateOptions
  257.  
  258.  
  259. kUCCollateComposeInsensitiveMask EQU    $00000002
  260. kUCCollateWidthInsensitiveMask    EQU        $00000004
  261. kUCCollateCaseInsensitiveMask    EQU        $00000008
  262. kUCCollateDiacritInsensitiveMask EQU    $00000010
  263.  
  264. kUCCollateStandardOptions        EQU        $00000006
  265.  
  266. ;   Special values to specify various invariant orders for UCCompareTextNoLocale.
  267. ;   These values use the high 8 bits of UCCollateOptions.
  268.  
  269.  
  270.  
  271. kUCCollateTypeHFSExtended        EQU        1
  272. ;  These constants are used for masking and shifting the invariant order type.
  273.  
  274. kUCCollateTypeSourceMask        EQU        $000000FF
  275. kUCCollateTypeShiftBits            EQU        24
  276.  
  277. kUCCollateTypeMask                EQU        $FF000000
  278. ; typedef UInt32                         UCCollationValue
  279.  
  280.  
  281.  
  282.  
  283. ;   -------------------------------------------------------------------------------------------------
  284. ;   CONSTANTS & DATA STRUCTURES for Unicode TextBreak
  285. ;   -------------------------------------------------------------------------------------------------
  286.  
  287.  
  288. ; typedef FourCharCode                     UCTextBreakType
  289.  
  290.  
  291. kUCTextBreakCharType            EQU        'char'
  292. kUCTextBreakWordType            EQU        'word'
  293. kUCTextBreakLineType            EQU        'line'
  294. ; typedef UInt32                         UCTextBreakOptions
  295.  
  296.  
  297. kUCTextBreakLeadingEdgeMask        EQU        $00000001
  298. kUCTextBreakGoBackwardsMask        EQU        $00000002
  299.  
  300. ;   -------------------------------------------------------------------------------------------------
  301. ;   CONSTANTS & DATA STRUCTURES for Unicode Properties
  302. ;   -------------------------------------------------------------------------------------------------
  303.  
  304.  
  305.  
  306. ; typedef SInt32                         UCCharPropertyType
  307.  
  308.  
  309. kUCCharPropTypeGenlCategory        EQU        1                    ; requests enumeration value
  310. kUCCharPropTypeCombiningClass    EQU        2                    ; requests numeric value 0..255
  311. kUCCharPropTypeBidiCategory        EQU        3                    ; requests enumeration value
  312. ; typedef UInt32                         UCCharPropertyValue
  313.  
  314. ;  General Category enumeration values (requested by kUCCharPropTypeGenlCategory)
  315.  
  316.                                                             ; Normative categories:
  317. kUCGenlCatOtherNotAssigned        EQU        0                    ; Cn Other, Not Assigned
  318. kUCGenlCatOtherControl            EQU        1                    ; Cc Other, Control
  319. kUCGenlCatOtherFormat            EQU        2                    ; Cf Other, Format
  320. kUCGenlCatOtherSurrogate        EQU        3                    ; Cs Other, Surrogate
  321. kUCGenlCatOtherPrivateUse        EQU        4                    ; Co Other, Private Use
  322. kUCGenlCatMarkNonSpacing        EQU        5                    ; Mn Mark, Non-Spacing
  323. kUCGenlCatMarkSpacingCombining    EQU        6                    ; Mc Mark, Spacing Combining
  324. kUCGenlCatMarkEnclosing            EQU        7                    ; Me Mark, Enclosing
  325. kUCGenlCatNumberDecimalDigit    EQU        8                    ; Nd Number, Decimal Digit
  326. kUCGenlCatNumberLetter            EQU        9                    ; Nl Number, Letter
  327. kUCGenlCatNumberOther            EQU        10                    ; No Number, Other
  328. kUCGenlCatSeparatorSpace        EQU        11                    ; Zs Separator, Space
  329. kUCGenlCatSeparatorLine            EQU        12                    ; Zl Separator, Line
  330. kUCGenlCatSeparatorParagraph    EQU        13                    ; Zp Separator, Paragraph
  331.                                                             ; Informative categories:
  332. kUCGenlCatLetterUppercase        EQU        14                    ; Lu Letter, Uppercase
  333. kUCGenlCatLetterLowercase        EQU        15                    ; Ll Letter, Lowercase
  334. kUCGenlCatLetterTitlecase        EQU        16                    ; Lt Letter, Titlecase
  335. kUCGenlCatLetterModifier        EQU        17                    ; Lm Letter, Modifier
  336. kUCGenlCatLetterOther            EQU        18                    ; Lo Letter, Other
  337. kUCGenlCatPunctConnector        EQU        20                    ; Pc Punctuation, Connector
  338. kUCGenlCatPunctDash                EQU        21                    ; Pd Punctuation, Dash
  339. kUCGenlCatPunctOpen                EQU        22                    ; Ps Punctuation, Open
  340. kUCGenlCatPunctClose            EQU        23                    ; Pe Punctuation, Close
  341. kUCGenlCatPunctInitialQuote        EQU        24                    ; Pi Punctuation, Initial quote
  342. kUCGenlCatPunctFinalQuote        EQU        25                    ; Pf Punctuation, Final quote
  343. kUCGenlCatPunctOther            EQU        26                    ; Po Punctuation, Other
  344. kUCGenlCatSymbolMath            EQU        28                    ; Sm Symbol, Math
  345. kUCGenlCatSymbolCurrency        EQU        29                    ; Sc Symbol, Currency
  346. kUCGenlCatSymbolModifier        EQU        30                    ; Sk Symbol, Modifier
  347. kUCGenlCatSymbolOther            EQU        31                    ; So Symbol, Other
  348. ;  Bidirectional Category enumeration values (requested by kUCCharPropTypeBidiCategory)
  349.  
  350. kUCBidiCatNotApplicable            EQU        0                    ; for now use this for unassigned
  351.                                                             ; Strong types:
  352. kUCBidiCatLeftRight                EQU        1                    ; L  Left-Right
  353. kUCBidiCatRightLeft                EQU        2                    ; R  Right-Left
  354.                                                             ; Weak types:
  355. kUCBidiCatEuroNumber            EQU        3                    ; EN European Number
  356. kUCBidiCatEuroNumberSeparator    EQU        4                    ; ES European Number Separator
  357. kUCBidiCatEuroNumberTerminator    EQU        5                    ; ET European Number Terminator
  358. kUCBidiCatArabicNumber            EQU        6                    ; AN Arabic Number
  359. kUCBidiCatCommonNumberSeparator    EQU        7                    ; CS Common Number Separator
  360.                                                             ; Separators:
  361. kUCBidiCatBlockSeparator        EQU        8                    ; B  Block Separator
  362. kUCBidiCatSegmentSeparator        EQU        9                    ; S  Segment Separator
  363.                                                             ; Neutrals:
  364. kUCBidiCatWhitespace            EQU        10                    ; WS Whitespace
  365. kUCBidiCatOtherNeutral            EQU        11                    ; ON Other Neutrals (unassigned codes could use this)
  366.  
  367. ;   -------------------------------------------------------------------------------------------------
  368. ;   FUNCTION PROTOTYPES
  369. ;   -------------------------------------------------------------------------------------------------
  370.  
  371.  
  372.  
  373. ;
  374. ; pascal OSStatus UCKeyTranslate(const UCKeyboardLayout *keyLayoutPtr, UInt16 virtualKeyCode, UInt16 keyAction, UInt32 modifierKeyState, UInt32 keyboardType, OptionBits keyTranslateOptions, UInt32 *deadKeyState, UniCharCount maxStringLength, UniCharCount *actualStringLength, UniChar unicodeString[2147483647])
  375. ;
  376.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  377.         IMPORT_CFM_FUNCTION UCKeyTranslate
  378.     ENDIF
  379.  
  380. ;  Standard collation functions
  381. ;
  382. ; extern OSStatus UCCreateCollator(LocaleRef locale, LocaleOperationVariant opVariant, UCCollateOptions options, CollatorRef *collatorRef)
  383. ;
  384.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  385.         IMPORT_CFM_FUNCTION UCCreateCollator
  386.     ENDIF
  387.  
  388. ;
  389. ; extern OSStatus UCGetCollationKey(CollatorRef collatorRef, const UniChar *textPtr, UniCharCount textLength, ItemCount maxKeySize, ItemCount *actualKeySize, UCCollationValue collationKey[2147483647])
  390. ;
  391.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  392.         IMPORT_CFM_FUNCTION UCGetCollationKey
  393.     ENDIF
  394.  
  395. ;
  396. ; extern OSStatus UCCompareCollationKeys(const UCCollationValue *key1Ptr, ItemCount key1Length, const UCCollationValue *key2Ptr, ItemCount key2Length, Boolean *equivalent, SInt32 *order)
  397. ;
  398.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  399.         IMPORT_CFM_FUNCTION UCCompareCollationKeys
  400.     ENDIF
  401.  
  402. ;
  403. ; extern OSStatus UCCompareText(CollatorRef collatorRef, const UniChar *text1Ptr, UniCharCount text1Length, const UniChar *text2Ptr, UniCharCount text2Length, Boolean *equivalent, SInt32 *order)
  404. ;
  405.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  406.         IMPORT_CFM_FUNCTION UCCompareText
  407.     ENDIF
  408.  
  409. ;
  410. ; extern OSStatus UCDisposeCollator(CollatorRef *collatorRef)
  411. ;
  412.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  413.         IMPORT_CFM_FUNCTION UCDisposeCollator
  414.     ENDIF
  415.  
  416. ;  Simple collation using default locale
  417.  
  418. ;
  419. ; extern OSStatus UCCompareTextDefault(UCCollateOptions options, const UniChar *text1Ptr, UniCharCount text1Length, const UniChar *text2Ptr, UniCharCount text2Length, Boolean *equivalent, SInt32 *order)
  420. ;
  421.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  422.         IMPORT_CFM_FUNCTION UCCompareTextDefault
  423.     ENDIF
  424.  
  425.  
  426. ;  Simple locale-independent collation
  427.  
  428. ;
  429. ; extern OSStatus UCCompareTextNoLocale(UCCollateOptions options, const UniChar *text1Ptr, UniCharCount text1Length, const UniChar *text2Ptr, UniCharCount text2Length, Boolean *equivalent, SInt32 *order)
  430. ;
  431.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  432.         IMPORT_CFM_FUNCTION UCCompareTextNoLocale
  433.     ENDIF
  434.  
  435. ;  Standard text break (text boundary) functions
  436. ;
  437. ; extern OSStatus UCCreateTextBreakLocator(LocaleRef locale, LocaleOperationVariant opVariant, UCTextBreakType breakType, TextBreakLocatorRef *breakRef)
  438. ;
  439.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  440.         IMPORT_CFM_FUNCTION UCCreateTextBreakLocator
  441.     ENDIF
  442.  
  443. ;
  444. ; extern OSStatus UCFindTextBreak(TextBreakLocatorRef breakRef, UCTextBreakOptions options, const UniChar *textPtr, UniCharCount textLength, UniCharCount startOffset, UniCharCount *breakOffset)
  445. ;
  446.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  447.         IMPORT_CFM_FUNCTION UCFindTextBreak
  448.     ENDIF
  449.  
  450. ;
  451. ; extern OSStatus UCDisposeTextBreakLocator(TextBreakLocatorRef *breakRef)
  452. ;
  453.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  454.         IMPORT_CFM_FUNCTION UCDisposeTextBreakLocator
  455.     ENDIF
  456.  
  457. ;  Standard Unicode properties functions
  458.  
  459. ;
  460. ; extern OSStatus UCGetCharProperty(const UniChar *charPtr, UniCharCount textLength, UCCharPropertyType propType, UCCharPropertyValue *propValue)
  461. ;
  462.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  463.         IMPORT_CFM_FUNCTION UCGetCharProperty
  464.     ENDIF
  465.  
  466.     ENDIF ; __UNICODEUTILITIES__ 
  467.  
  468.